package com.tiancheng.trade.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 信用订单类型类型
 */
@Getter
@AllArgsConstructor
public enum CreditOrderCreditTypeEnum {
    ZHIMA("zhima", "芝麻信用"),
    WX("wx", "微信"),
    ;
    private String code;
    private String desc;

    public static String getDesc(String code) {
        CreditOrderCreditTypeEnum[] businessModeEnums = values();
        for (CreditOrderCreditTypeEnum statusEnum : businessModeEnums) {
            if (statusEnum.code().equals(code)) {
                return statusEnum.desc();
            }
        }
        return null;
    }

    public String code() {
        return this.code;
    }

    public String desc() {
        return this.desc;
    }
}
